package com.sg.controller.pbff;

import com.sg.service.biz.pbff.DeploymentService;
import com.sg.dto.biz.pbff.req.*;
import com.sg.dto.biz.pbff.res.*;
import com.sg.common.ro.OkrResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：
 * @version 1.0
 * @date ：
 */
@Api(value = "Deployment", tags = {"Deployment"})
@RestController
// @RequestMapping("/poms/deployment/")
public class DeploymentController {

    @Autowired
    DeploymentService deploymentService;

    /**
     * B6判断数据分离(管理)
     * gen by moon at 9/13/2023, 10:45:04 PM
     */
    @PostMapping("/oms/platform/operation/mgt/deployment/judgeDataSeparation")
    @ApiOperation(value = "B6判断数据分离(管理)", response = OkrResult.class)
    public OkrResult<BffJudgeDataSeparationRespDto> judgeDataSeparation(@RequestBody(required = false) @Validated BffJudgeDataSeparationReqDto reqDTO) {
        return OkrResult.success(deploymentService.judgeDataSeparation(reqDTO));
    }

    /**
     * B6修改数据分离(管理)
     * gen by moon at 9/13/2023, 10:57:07 PM
     */
    @PostMapping("/oms/platform/operation/mgt/deployment/updateDataSeparation")
    @ApiOperation(value = "B6修改数据分离(管理)", response = OkrResult.class)
    public OkrResult<BffUpdateDataSeparationRespDto> updateDataSeparation(@RequestBody(required = false) @Validated BffUpdateDataSeparationReqDto reqDTO) {
        return OkrResult.success(deploymentService.updateDataSeparation(reqDTO));
    }

    /**
     * B6查询数据分离列表(管理)
     * gen by moon at 9/13/2023, 10:57:10 PM
     */
    @PostMapping("/oms/platform/operation/mgt/deployment/queryDataSeparationList")
    @ApiOperation(value = "B6查询数据分离列表(管理)", response = OkrResult.class)
    public OkrResult<BffQueryDataSeparationListRespDto> queryDataSeparationList(@RequestBody(required = false) @Validated BffQueryDataSeparationListReqDto reqDTO) {
        return OkrResult.success(deploymentService.queryDataSeparationList(reqDTO));
    }

    /**
     * B6查询数据分离详情(管理)
     * gen by moon at 9/13/2023, 10:57:12 PM
     */
    @PostMapping("/oms/platform/operation/mgt/deployment/queryDataSeparationDetail")
    @ApiOperation(value = "B6查询数据分离详情(管理)", response = OkrResult.class)
    public OkrResult<BffQueryDataSeparationDetailRespDto> queryDataSeparationDetail(@RequestBody(required = false) @Validated BffQueryDataSeparationDetailReqDto reqDTO) {
        return OkrResult.success(deploymentService.queryDataSeparationDetail(reqDTO));
    }
}
